#pragma once

#include "Controller.h"

namespace _MODULE_
{
	namespace _GAME_
	{

		struct GameControllCommandStates
		{
			union 
			{
				int Flag;
				struct
				{
					int bMoveUp:1;
					int bMoveDown:1;
					int bMoveLeft:1;
					int bMoveRight:1;
					int bMoveForward:1;
					int bMoveBackward:1;
				};
			}MoveFlags;

			union 
			{
				int Flag;
				struct
				{
					int bRotateRollCW:1;
					int bRotateRollCCW:1;
					int bRotatePitchCW:1;
					int bRotatePitchCCW:1;
					int bRotateYawCW:1;
					int bRotateYawCCW:1;

				};
			}RotateFlags;

			union 
			{
				int Flag;
				struct
				{
					int bControllPrimaryWeapon:1;
				
				};
			}ControllFlags;
		};

		class LocalController:
			public Controller
		{
		public:
			LocalController(void);
			~LocalController(void);


			bool ProcessCommand(const _FOGGE_::foString& command,const _FOGGE_::foString& flag );

			void Update(float elapsedtime);

		protected:
			GameControllCommandStates m_GameControllCommandStates;

			GameControllCommandStates m_OldGameControllCommandStates;
		};
	}
}